@if (!inCard()) {
  <ix-page-header>
    <ix-search-input1 [value]="filterString" (search)="onListFiltered($event)"></ix-search-input1>
    <button
      *ixRequiresRoles="requiredRoles"
      mat-button
      color="primary"
      ixTest="add-kerberos-realms"
      [ixUiSearch]="searchableElements.elements.add"
      (click)="doAdd()"
    >
      {{ 'Add' | translate }}
    </button>
  </ix-page-header>
}

<div class="table-container" [ixUiSearch]="searchableElements.elements.kerberosRealms">
  @if (inCard()) {
    <mat-toolbar-row class="table-header">
      <div class="heading" [routerLink]="['/', 'directoryservice', 'kerberosrealms']">
        <h3>{{ 'Kerberos Realms' | translate }}</h3>
        <ix-icon name="open_in_new"></ix-icon>
      </div>
      <div class="action">
        <button
          *ixRequiresRoles="requiredRoles"
          mat-button
          ixTest="add-idmap"
          (click)="doAdd()"
        >
          {{ 'Add' | translate }}
        </button>
      </div>
    </mat-toolbar-row>
  }
  <ix-table
    [ix-table-empty]="!(dataProvider.currentPageCount$ | async)"
    [emptyConfig]="emptyService.defaultEmptyConfig(dataProvider.emptyType$ | async)"
  >
    <thead
      ix-table-head
      [columns]="columns"
      [dataProvider]="dataProvider"
    ></thead>
    <tbody
      ix-table-body
      [columns]="columns"
      [dataProvider]="dataProvider"
      [isLoading]="!!(dataProvider.isLoading$ | async)"
    >
    </tbody>
  </ix-table>
  @if (paginator()) {
    <ix-table-pager [dataProvider]="dataProvider"></ix-table-pager>
  }
</div>
